package com.wangfei.lecture.springannotations;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 相当于xml
 * <beans>
 *     <bean id="myBean" class="...MyBean"></bean>
 * </beans>
 */
@Configuration
public class AppConfig{
    @Bean
    public MyBean myBean(){
        // instantiate, configure and return bean ...
        return new MyBean();
    }
}

